package com.hua.yuan.manager.user;

import com.hua.yuan.manager.user.business.IUserBusiness;
import com.hua.yuan.manager.user.business.impl.UserBusinessImpl;

/**
 * @Author: richsjeson.
 * @Description: 用户登录模组
 * @Date:Created in 2018/12/12 下午11:03.
 * @Modified By:
 */
public class UserManagerModule {

    private IUserBusiness mBusiness;

    public final static String HEAD_URL = "head_url";

    public final static  String MOBILE = "mobile";

    public final static String NICK_NAME = "nick_name";

    public final static String SEX = "sex";

    public final static String BIRTHDAY = "birthday";

    public final static String ERROR_NO="errno";

    public final static String TOKEN="token";

    public final static String PASSWORD="password";

    public final static String SMS_CODE="sms_code";

    //模块业务代号->修改昵称  TODO ZYB 后续抽离至Ui页面
    public final static int BUSINESS_NICK_NAME=1000;

    public static class Builder {

        private static UserManagerModule instance = new UserManagerModule();
    }

    public static UserManagerModule getInstance() {

        return Builder.instance;
    }


    public void init(){

        mBusiness=new UserBusinessImpl();
    }


    /**
     * 获取用户登录模块的Business业务层
     *
     * @return 返回业务层对象
     */
    public IUserBusiness getUserManager() {
        return mBusiness;
    }

    public void release(){
        mBusiness=null;
    }

}
